<html>
<head>
	<title>请假单管理</title>
	<meta name="decorator" content="default"/>
	  <meta charset="utf-8">
	  <script src="../../../js/headjsp.js"></script>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content" id="rrapp">
	<div class="ibox">
	<div class="ibox-title">
		<h5>请假单列表 </h5>
		<div class="ibox-tools">
			<a class="collapse-link">
				<i class="fa fa-chevron-up"></i>
			</a>
			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
				<i class="fa fa-wrench"></i>
			</a>
			<ul class="dropdown-menu dropdown-user">
				<li><a href="#">选项1</a>
				</li>
				<li><a href="#">选项2</a>
				</li>
			</ul>
			<a class="close-link">
				<i class="fa fa-times"></i>
			</a>
		</div>
	</div>
    
    <div class="ibox-content">
	<sys:message content="${message}"/>
	
	<!--查询条件-->
	<div class="row">
	<div class="col-sm-12">
	<form id="searchForm" modelAttribute="formLeavem" action="http://localhost:8000/admin/mvvmoa/formLeavem/listjson" method="post" class="form-inline">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<input id="orderBy" name="orderBy" type="hidden" value="beginDate DESC"><!-- 支持排序 -->
<div class="form-group">
			<span>员工：</span>
	<input id="userId" name="user.id" class="form-control input-sm" type="hidden" value="">
	<div class="input-group">
		<input id="userName" name="user.name" readonly="readonly" type="text" value="" data-msg-required="" class="form-control input-sm" style="">
       		 <span class="input-group-btn">
	       		 <button type="button" id="userButton" class="btn  btn-sm   btn-white  "><i class="fa fa-search"></i>
	             </button> 
       		 </span>
       		
    </div>
	 <label id="userName-error" class="error" for="userName" style="display:none"></label>

		 </div>	
	</form>
	<br/>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div class="row">
	<div class="col-sm-12">
		<div class="pull-left">

				<button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="left" @click="addForm()" title="添加"><i class="fa fa-plus"></i> 添加</button>

			    <button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="left" @click="editFormSelect()" title="修改"><i class="fa fa-file-text-o"></i> 修改</button>

				<button class="btn btn-white btn-sm" onclick="deleteAll()" data-toggle="tooltip" data-placement="top"><i class="fa fa-trash-o"> 删除</i></button>
		
				<button id="btnImport" class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" title="导入"><i class="fa fa-folder-open-o"></i> 导入</button>

				<button id="btnExport" class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" title="导出"><i class="fa fa-file-excel-o"></i> 导出</button>

	       		<button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
		
			</div>
		<div class="pull-right">
			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " @click="search()" ><i class="fa fa-search"></i> 查询</button>
			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
		</div>
	</div>
	</div>
	
	<!-- 表格 -->
	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
		<thead>
			<tr>
				<th> <input type="checkbox" class="i-checks"></th>
				<th  class="sort-column user.name">员工</th>
				<th  class="sort-column office.name">归属部门</th>
				<th  class="sort-column area.name">归属区域</th>
				<th  class="sort-column beginDate">请假开始日期</th>
				<th  class="sort-column endDate">请假结束日期</th>
				<th  class="sort-column remarks">备注信息</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr  v-for="formLeavem in page" >
				<td> <input type="checkbox" :id="formLeavem.id" class="i-checks"></td>
				<td><a  href="#" onclick="openDialogView('查看请假单', '${ctx}/mvvmoa/formLeavem/form?id={{formLeavem.id}}','800px', '500px')">
					{{formLeavem.user.name}}-{{formLeavem.office.name}}-{{formLeavem.area.name}}
				</a></td>
				<td>
					{{formLeavem.office.name}}
				</td>
				<td>
					{{formLeavem.area.name}}
				</td>
				<td>
					{{formLeavem.beginDate}}
				</td>
				<td>
					{{formLeavem.endDate}}
				</td>
				<td>
					{{formLeavem.remarks}}
				</td>
				<td>
				<a href="#" v-on:click="view(formLeavem.id)"  class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
  				<a href="#" v-on:click="editform(formLeavem.id)" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
				<a href="#" v-on:click="deletex(formLeavem.id)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
				</td>
			</tr>
			
		</tbody>
	</table>
	
		<!-- 分页代码 -->
	<table:page page="${page}"></table:page>
	<br/>
	<br/>
	</div>
	</div>
</div>
	<script src="../../../js/SpringUI.js"></script>
</body>
</html>